using System;
using System.Data;
using System.Collections.Generic;
using System.Data.SqlClient;
using Core;

namespace DataAccess
{
    public class NganhDaoTao : Popular
    {

        public int id { get; set; }
        public string TenNganh { get; set; }
        public string MaNganh { get; set; }
        public string BacHoc { get; set; }
        public string HeDaoTao { get; set; }
        public string GioiThieu { get; set; }
        public int OrgID { get; set; }
        Common<NganhDaoTao> cm = new Common<NganhDaoTao>();
        public bool Insert(Popular b)
        {
            return cm.Insert(b as NganhDaoTao, "sp_NganhDaoTao_Insert");
        }
        public bool Update(Popular b)
        {
            return cm.UpDate(b as NganhDaoTao, "sp_NganhDaoTao_Update");
        }
        public bool Delete(object b)
        {
            return cm.Delete(b, "sp_NganhDaoTao_Delete");
        }
        public IDataReader Select_ID(object b)
        {
            return cm.Select_ID(b, "sp_NganhDaoTao_SelectByID");
        }
        public IDataReader Select_Name(object b)
        {
            return cm.Select_Name(b, "sp_NganhDaoTao_SelectByName");
        }
        public IDataReader SelectAll()
        {
            return cm.Select_All("sp_NganhDaoTao_SelectAll");
        }
        public List<NganhDaoTao> SelectAllToList()
        {
            return cm.SelectAll<NganhDaoTao>("sp_NganhDaoTao_SelectAll");
        }
        public List<NganhDaoTao> SelectByOrg(object b)
        {
            return CBO.FillCollection<NganhDaoTao>(DataProvider.Instance.ExecuteReader("sp_NganhDaoTao_SelectByOrg",b));
        }
    }
}